<%@ page import="cn.edu.usst.cs.chat_room01.ServletInterface" %>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>登录聊天室</title>
</head>
<body>
<%
    Object warning_raw = request.getSession().getAttribute(ServletInterface.WARNING);
    if (warning_raw != null) {
%>
<script language="JavaScript">
    alert("<%=warning_raw%>")
</script>
<%
    }
%>
<h1>请输入登录信息</h1>
<br/>
<div id="username_div">
    <label for="username_input">用户
        <input id="username_input" type="text" name="用户名">
    </label>
    <button id="user_submit_button" value="获取验证码">获取验证码</button>
    <div id="captcha_request_div">
    </div>
</div>
<form id="captcha_submit_form" action="hello" method="post" style="display: none">
    <fieldset>
        <label for="username_readonly">用户
            <input id="username_readonly" type="text" name="username_readonly">
        </label>
        <div id="captcha_input_div">
            <label>请输入下方验证码</label>
            <label for="captcha_input">
                <input type="text" id="captcha_input" name="captcha_input">
            </label>
        </div>
        <div id="captcha_submit_div">
            <button id="captcha_submit_button" type="submit">登录</button>
        </div>
    </fieldset>
    <br/>
    <div id="captcha_img_div" style="display:none">
    </div>
</form>

<script src="login.js?<%= System.currentTimeMillis() %>" type="text/javascript"></script>
</body>
</html>